package com.wiken.orderservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wiken.orderservice.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wiken.orderservice.entity.OrderCommodity;
import com.wiken.orderservice.vo.OrderAndCommmodityVO;
import com.wiken.servicecommon.common.PageUtill;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wiken
 * @since 2022-12-28
 */
public interface IOrderService extends IService<Order> {
    Order addOrder(Order order, List<OrderCommodity> orderCommodities, String token);

    boolean delOrder(String orderId, String token);

    boolean updateOrder(Order order, String token);

    //已支付订单
    Page<OrderAndCommmodityVO> getOrderOfPayed(String token, PageUtill pageUtill);

    //待支付订单
    Page<OrderAndCommmodityVO> getOrderOfPay(String token, PageUtill pageUtill);

    //过期订单
    Page<OrderAndCommmodityVO> getOrderOfExpire(String token, PageUtill pageUtill);
}
